
<div class="row">
<?if(isset($system_message))echo $system_message;
echo validation_errors('<div class="error">', '</div>');
?>
	<fieldset>
		<legend>Update Grade Levels</legend>
			<div class="notice" style="max-width:800px;">
				</p><span class="bold big">Level Hierarchy</span> will be used by the system for determining what grade level to assign an enrollee.
				Please set your grade level in hierarchial order according to their grade order.
				</p>
				</p><span class="bold big">Level Status</span> If active or inactive</p>
			</div>
			<?if(!empty($grade_level_data)):?>
				<form action="<?site_url('admin/update_grade_level')?>" method="POST">
				<table class="data-table">
					<tbody class="tabular">
						<?foreach($grade_level_data as $key => $val):?>
						<tr>
							<td>Level Code:<input type="text" name="grade_levels[<?=$val->level_id;?>][level_code]" value="<?=set_value('grade_levels['.$val->level_id.'][code].',$val->level_code);?>"></td>
							<td>Level Desc:<input type="text" name="grade_levels[<?=$val->level_id;?>][level_desc]" value="<?=set_value('grade_levels['.$val->level_id.'][desc].',$val->level_desc);?>"></td>
							<td>Level Status:<?=form_dropdown('grade_levels['.$val->level_id.'][level_stat]',$status_opt,$val->level_stat);?></td>
							<td>Level Category:<?=form_dropdown('grade_levels['.$val->level_id.'][level_category]',$category_opt,$val->level_category);?></td>
							<td>Level Hierarchy:<?=form_dropdown('grade_levels['.$val->level_id.'][level_hierarchy]',$level_heiarchy_opt,$val->level_hierarchy);?></td>
							<input type="hidden" name="grade_levels[<?=$val->level_id;?>][level_id]" value="<?=$val->level_id;?>">
						</tr>
						<?endforeach;?>
					</tbody>
				</table>
					<input type="submit" name="update_grade_levels" class="button tiny"value="Update Grade Levels">
				</form>
			<?else:?>
				<div class="notice">No Grade levels have been set.</div>
			<?endif;?>
		
	</fieldset>
</div>